﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace QYmall.Core.Model.ViewModels
{
    /// <summary>
    /// 扩展字段值(显示)
    /// </summary>
    public class ShopFieldOptionDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public int Id { get; set; }

        /// <summary>
        /// 扩展属性ID
        /// </summary>
        [Display(Name = "扩展属性")]
        public int FieldId { get; set; }

        /// <summary>
        /// 属性名
        /// </summary>
        [Display(Name = "属性名")]
        [Required(ErrorMessage = "{0}不可为空")]
        [StringLength(128)]
        public string? Name { get; set; }

        /// <summary>
        /// 控件类型(单选多选下拉框等)
        /// </summary>
        [Display(Name = "控件类型")]
        [Required(ErrorMessage = "{0}不可为空")]
        [StringLength(128)]
        public string? ControlType { get; set; }

        /// <summary>
        /// 选项列表
        /// </summary>
        [Display(Name = "选项列表")]
        [Required(ErrorMessage = "{0}不可为空")]
        [StringLength(512)]
        public string? ItemOption { get; set; }
    }
}
